package org.framework.gofun.mongodb.utils;




import java.util.HashMap;
import java.util.Map;

public class MongoCollectionsUtil {

//	private static Map<Class<?>, String> COLLECTION_NAMES = new HashMap<Class<?>, String>();
	
	
	
	public static String getCollectionName(Class<?> clazz){
		String collectionName ;
		//= COLLECTION_NAMES.get(clazz);
		clazz.getName();
		switch (clazz.getName()) {
		case "carTrack":
			collectionName = "carTrack";
			break;
		case "CarStatus":
			collectionName = "carStatus";
			break;
		case "CarControlVo":
			collectionName = "carControl";
			break;
		case "CarAlarmVo":
			collectionName = "carAlarm";
			break;
		default:
			throw new RuntimeException("collection name not exist : class = " + clazz);
		}
		
		return collectionName;
	}
	public static void main(String[] args) {
		System.out.println(getCollectionName(MongoCollectionsUtil.class));
	}
	
}
